package com.entity;

import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 *  【经营项目】- 当日营收情况
 */

@Entity
@Table(name = "business_project_revenue")
@Getter @Setter @NoArgsConstructor
public class BusinessProjectRevenue extends BaseEntity {

    @Column
    private String projectName;

    // 营收日期
    @Column(name = "revenue_date")
    @Temporal(TemporalType.DATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date revenueDate;

    // 合作方应收金额
    @Column(name = "partner_revenue", precision = 15, scale = 2, columnDefinition = "DECIMAL(15,2) default 0")
    private BigDecimal partnerRevenue =  BigDecimal.ZERO;

    // 项目分成比例
    @Column(name = "profit_share", precision = 15, scale = 2, columnDefinition = "DECIMAL(15,2) default 0")
    private BigDecimal profitShare =  BigDecimal.ZERO;

    @Column(name = "remark", length = 500)
    private String remark;

}